package model

import "time"

type User struct {
	ID        uint64     `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
	Name      *string    `json:"name,omitempty" gorm:"column:name;type:varchar(100);collate:utf8mb4_unicode_ci"`
	Email     *string    `json:"email,omitempty" gorm:"column:email;type:varchar(100);collate:utf8mb4_unicode_ci"`
	Status    *int       `json:"status,omitempty" gorm:"column:status"`
	Age       *uint8     `json:"age,omitempty" gorm:"column:age"`
	CreatedAt *time.Time `json:"created_at,omitempty" gorm:"column:created_at"`
	UpdatedAt *time.Time `json:"updated_at,omitempty" gorm:"column:updated_at"`
}

// TableName 指定表名
func (User) TableName() string {
	return "users"
}
